<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-1.11.1.min.js"></script>
    <script>
        $(document).ready(function () {
           $("button").click(function () {
               $("li").each(function () {
                   alert($(this).text());
               })
           }) ;
        });
    </script>
</head>
<body>
    <button>输出每个列表项的值</button>
    <ul>
        <li>Coffee</li>
        <li>Milk</li>
        <li>Soda</li>
    </ul>
</body>
</html>